<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>4.行级元素浮动后转为块元素</title>
<style>
  div {
    width: 200px;
    height: 200px;

  }

  main {
    border: solid 3px black;
    height: 220px;
    width: 620px;
    margin: 0 auto;
    padding: 20px;

  }


  span {
    border: solid 2px blue;
    width: 300px;
    height: 50px;
    float: left;
  }

  span:nth-of-type(2) {
    float: right;
  }
</style>
</head>

<body>
  <main>
    <span>houdunren.com</span><span>hdcms.com</span>
  </main>
</body>

</html>